﻿#region

using BTL.OnlineTestingSocial.Services.TestingEngine.Service.DAL;
using BTL.Technology.Framework;

#endregion

namespace BTL.OnlineTestingSocial.Services.TestingEngine.Service.BLL
{
    public class CommentManager : ICommentManager
    {
        private readonly ICommentRepository _commentRepository;

        public CommentManager(ICommentRepository commentRepository)
        {
            _commentRepository = commentRepository;
        }

        #region ICommentManager Members

        public bool InsertComment(string content, int? questionDetailId, int? questionGroupId, string createBy)
        {
            Guard.MakeSureAllInstancesIsNullNot(_commentRepository);

            return _commentRepository.InsertComment(content, questionDetailId, questionGroupId, createBy);
        }

        #endregion
    }
}